#ifndef FEED__H
#define FEED__H
#include <string>
#include <list>
#include <time.h>
#include "News.h"
#include "Registro.h"

using namespace std;
//TODO:Definir formato de entrada de fechas(por ahora es un epoch)
class Feed{

private:
	TCId id;
	string url;
	string name;
	time_t date;
	typedef list<News> NewsList;
	NewsList newslist;
	
public:
	  typedef NewsList::iterator iterator;
	  typedef NewsList::const_iterator const_iterator;
	  Feed();
	  Feed(TCId id,const string& url,const time_t& date);
	  virtual ~Feed(){};
	  void setURL(const string& url);
	  void setDate(const time_t& date);
	  void setName(const string &name);
	  void addNews(const News& news);
	  const TCId 	getId() const;
	  const string & getURL()const;
	  const time_t & getDate()const;
	  const string & getName()const;
	  iterator  begin(){return newslist.begin();}
	  iterator  end(){return newslist.end();}
	  
};

#endif /*FEED__H*/

